Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP: Deepdish to h5py #60

Merged
merged 19 commits into from
Mar 23, 2023
Merged

DEP: Deepdish to h5py #60

merged 19 commits into from
Mar 23, 2023

Conversation

carleyjmartin
Copy link
Collaborator

Scope

The deepdish library is not being maintained any longer so we are going to move to using h5py solely. Instances of deeepdish use in the borealis package need updating. This PR is to track those changes.

issue: #58

Approval

Number of approvals: 2

Test

Will provide when testing needed.

*Reminder:

  • Modification line to be filled in *

RemingtonRohel and others added 5 commits March 17, 2023 18:15
* Haven't added any code for dealing with data_descriptors or correlation_descriptors fields (they are finnicky)
* Updated h5py dependency to need >= v3.3.0
* Have not tested whatsoever
* Can now read in site file and convert to array format.
* Still need to fix reading/writing array format.
* Bools stored as uint8
* Reading in arrays of strings requires some care
@RemingtonRohel RemingtonRohel marked this pull request as ready for review March 21, 2023 20:37
* Can now read/write array structured files.
* Can also restructure freely between site and array files, both with BorealisRestructure and BorealisRead plus .records or .arrays
* Changed the method signature a bit for conciseness
* Both methods open HDF5 file with 'a' permission (read/write if exists, create otherwise). This will raise an exception if the file already has groups/datasets with the same name, which I think is worthy of erroring on.
* Changed borealis_restructure.py to also use the format writing methods.
setup.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
* experiment_comment and slice_comment fields are sometimes empty, so we need to handle them in order to convert to DMAP
pydarnio/borealis/base_format.py Outdated Show resolved Hide resolved
pydarnio/borealis/borealis_array.py Outdated Show resolved Hide resolved
RemingtonRohel and others added 4 commits March 22, 2023 19:26
* Had to deal more carefully with empty string attributes, and saving string attributes to file.
Co-authored-by: Theodore Kolkman <[email protected]>
Co-authored-by: Theodore Kolkman <[email protected]>
@RemingtonRohel RemingtonRohel linked an issue Mar 23, 2023 that may be closed by this pull request
Copy link
Collaborator

@Lozzy-Bear Lozzy-Bear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left some code change comments that shorten up the if statements.

Co-authored-by: Adam Lozinsky <[email protected]>
@RemingtonRohel RemingtonRohel merged commit 36aa7a3 into develop Mar 23, 2023
@RemingtonRohel RemingtonRohel deleted the deepdish_to_h5py branch March 23, 2023 17:44
Copy link
Collaborator Author

@carleyjmartin carleyjmartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with 0.6.1 or 0.5 files given, and I've just thrown all borealis code I have at it with no errors. (I can't tick approve on my own PRs, but I approve 💯)

EDIT: oops sorry I was seconds late

import h5py
import logging
import os
import subprocess as sp
import warnings
import numpy as np
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numpy not used in this file?

import logging
import numpy as np
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numpy not used in file?

@billetd billetd mentioned this pull request Jun 26, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deepdish library no longer maintained
4 participants